#define _CRT_SECURE_NO_WARNINGS 1

#include"SLT.h"

void testPushBack()
{
	SLNode* head = NULL;
	SLPushBack(&head, 1);
	SLPushBack(&head, 2);
	SLPushBack(&head, 3);
	SLPushBack(&head, 4);
	SLPushBack(&head, 5);
	SLPrint(head);
}
void testPushFront()
{
	SLNode* head = NULL;
	SLPushFront(&head, 5);
	SLPushFront(&head, 4);
	SLPushFront(&head, 3);
	SLPushFront(&head, 2);
	SLPushFront(&head, 1);
	SLPushFront(&head, 0);
	SLPrint(head);
}

void test()
{
	SLNode* head = NULL;
	SLPushBack(&head, 1);
	SLPushBack(&head, 2);
	SLPrint(head);//1 2
	SLPushFront(&head, 5);
	SLPushFront(&head, 4);
	SLPrint(head);//4 5 1 2
	SLPushAfter(&head,5,6);//4 5 6 1 2
	SLPrint(head);
	SLPopBack(&head);
	SLPrint(head);//4 5 6 1
	SLPopFront(&head);//5 6 1
	SLPrint(head);
	SLPopNode(&head,1);
	SLPrint(head);//5 6
	SLPopNode(&head, 5);
	//SLPopNode(&head, 6);
	SLPrint(head);//6
	//SLDestroy(head);
}

int main()
{
	/*testPushBack();*/
	/*testPushFront();*/
	test();
	return 0;
}